import service from './request'


export function getClass({pagenum,pagesize,department_id}) {
    return service.get('/classesinfo?page='+pagenum+'&page_size='+pagesize+'&college_id='+department_id)
}
export function getAllDepartment() {
    return service.get('/departments/all')
}
export function createClass(data) {
    return service.post('/classes',data)
}
export function removeClass(id) {
    return service.delete('/classes/'+id)
}

export function getRoleItem(id) {
    return service.get('/classes/'+id)
}

export function editRoleItem(id,data) {
    return service.put('/classes/'+id,data)
}


export function createCoursePlan(data) {
    data.gzDateTime=JSON.stringify(data.gzDateTime)
    return service.post('/courseplans',data)
}

export function getCoursePlan(cls_id,tc_id) {
    return service.get('/courseplans?cls_id='+cls_id+'&tc_id='+tc_id)
}

export function getIsGaoZhi(class_id) {
    return service.get('/getIsGaoZhi?class_id='+class_id)
}

//获取学院下面的所有班级
export function getClassByCollegeId(id){
    return service.get('/classes?college_id='+id+'&queryset=nopaged')
}
